define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

#include <math.h>

int main() {
    double V, b, r, a;
    b = 3.1415926;
    a = 1;
    char n = '0';

    while (a > 0) {
        printf("请输入半径：");
        scanf("%lf", &r);
        
        if (r >= 0 && r <= 15) {
            V = 4.0 / 3 * b * pow(r, 3);
            printf("体积为：%.31f\n", V);
        } else {
            printf("请注意范围!!\n");
        }

        printf("是否要再次计算? (Y/N): ");
        scanf(" %c", &n);
        
        if (n == 'Y' || n == 'y') {
            continue;
        } else if (n == 'N' || n == 'n') {
            printf("结束\n");
            break;
        } else {
            printf("无效输入，结束\n");
            break;
        }
    }

    return 0;
}